package cn.xopencode.userservice.enums;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * 婚姻状况
 */
public enum MarriageEnum implements IntArrayValuable {

    MARRIAGE0(0, "未知"),
    MARRIAGE1(1, "已婚"),
    MARRIAGE2(2, "未婚");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(MarriageEnum::getMarriage).toArray();

    /**
     * 婚姻状况
     */
    private final Integer marriage;
    /**
     * 描述
     */
    private final String name;

    MarriageEnum(Integer marriage, String name) {
        this.marriage = marriage;
        this.name = name;
    }

    public Integer getMarriage() {
        return marriage;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
